<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
<%@ taglib uri="http://myfaces.apache.org/tomahawk" prefix="t"%>
<%@ taglib uri="http://richfaces.org/a4j" prefix="a4j"%>
<%@ taglib uri="http://richfaces.org/rich" prefix="rich"%>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-tiles"
	prefix="tiles"%>

		<rich:panel header="#{messages['create.calendar']}">
			<h:panelGrid ><h:outputText value="#{errorBean.errorMessage}" styleClass="error"></h:outputText></h:panelGrid>
			
			<t:panelGrid columns="2">
			
				<h:outputText></h:outputText>
				<h:panelGroup>
				  	<h:outputText value="*" styleClass="standardText_Mandatory" /> 
					<h:outputText value="#{messages['instruction']}" styleClass="standardText_Instruction" />
				</h:panelGroup>
				
				<h:outputText></h:outputText>
				<t:message for="Code" styleClass="error"></t:message>
			
			    <h:panelGroup>
			    	<h:outputText value="*" styleClass="standardText_Mandatory" />	
				    <h:outputLabel for="Code" value="#{messages['code']}" styleClass="standardText_Label" />
			    </h:panelGroup>
			    <h:panelGroup>
			    	<t:inputText id="Code" required="true" size="10" maxlength="10" styleClass="standardText" value=""></t:inputText>
			    </h:panelGroup>
			    
			    <h:outputText></h:outputText>
				<t:message for="Name" styleClass="error"></t:message>
			    
				<h:panelGroup>
			    	<h:outputText value="*" styleClass="standardText_Mandatory" />	
				    <h:outputLabel for="Name" value="#{messages['name']}" styleClass="standardText_Label" />
			    </h:panelGroup>
			    <h:panelGroup>
			    	<t:inputText id="Name" required="true" size="50" maxlength="50" styleClass="standardText" value=""></t:inputText>
			    </h:panelGroup>
			    
			    <h:outputText></h:outputText>
				<t:message for="desc" styleClass="error"></t:message>
				
				<h:panelGroup>
					<h:outputText value="*" styleClass="standardText_Mandatory" />
					<h:outputLabel for="desc" value="#{messages['desc']}" styleClass="standardText_Label" />
				</h:panelGroup>
				<h:panelGroup>
					<t:inputTextarea id="desc" cols="20" rows="5" value=""></t:inputTextarea>
				</h:panelGroup>
				
				<h:outputText></h:outputText>
				<t:message for="datetype" styleClass="error"></t:message>
				
				<h:panelGroup>
					<h:outputText value="*" styleClass="standardText_Mandatory" />
					<h:outputLabel for="datetype" value="#{messages['date.type']}" styleClass="standardText_Label" />
				</h:panelGroup>
				<h:panelGroup>
					<t:selectOneRadio id="datetype" styleClass="standardText" value="" required="true">
						<f:selectItem itemLabel="Super Peak Season" itemValue="" />
						<f:selectItem itemLabel="Peak Season" itemValue="" />
					</t:selectOneRadio>
				</h:panelGroup>
				
				<h:outputText></h:outputText>
				<t:message for="calendartype" styleClass="error"></t:message>
				
				<h:panelGroup>
					<h:outputText value="*" styleClass="standardText_Mandatory" />
					<h:outputLabel for="calendartype" value="#{messages['calendar.type']}" styleClass="standardText_Label" />
				</h:panelGroup>
				<h:panelGroup>
					<t:selectOneRadio id="calendartype" styleClass="standardText" value="" required="true">
						<f:selectItem itemLabel="By Date" itemValue="" />
						<f:selectItem itemLabel="By Day" itemValue="" />
					</t:selectOneRadio>
				</h:panelGroup>
			    
			    <h:outputText></h:outputText>
				<t:message for="date" styleClass="error"></t:message>
			
			    <h:panelGroup>
			    	<h:outputText value="*" styleClass="standardText_Mandatory" />	
				    <h:outputLabel for="date" value="#{messages['date']}" styleClass="standardText_Label" />
			    </h:panelGroup>
			    <h:panelGroup>
			    	<t:inputCalendar
			    	id="date"
						monthYearRowClass="yearMonthHeader" weekRowClass="weekHeader" 
						currentDayCellClass="currentDayCell" value=""
						renderAsPopup="true" popupTodayString="#{messages['popup.today']}"
						popupWeekString="#{messages['popup.week']}" popupDateFormat="dd/MM/yyyy"
						renderPopupButtonAsImage="true"
						styleClass="standardText" required="true">
			    	</t:inputCalendar>
			    </h:panelGroup>
			    
			    <h:outputText></h:outputText>
				<t:message for="day" styleClass="error"></t:message>
				
				<h:panelGroup>
			    	<h:outputText value="*" styleClass="standardText_Mandatory" />	
				    <h:outputLabel for="day" value="#{messages['day']}" styleClass="standardText_Label" />
			    </h:panelGroup>
			    <t:selectManyCheckbox id="day" layout="pageDirection" styleClass="standardText" value="" required="true">
						<f:selectItem itemLabel="Sunday" itemValue="" />
						<f:selectItem itemLabel="Monday" itemValue="" />
						<f:selectItem itemLabel="Tuesday" itemValue="" />
						<f:selectItem itemLabel="Wednesday" itemValue="" />
						<f:selectItem itemLabel="Thursday" itemValue="" />
						<f:selectItem itemLabel="Friday" itemValue="" />
						<f:selectItem itemLabel="Saturday" itemValue="" />
				</t:selectManyCheckbox>
			
				
				<h:panelGroup></h:panelGroup>
				<h:panelGroup></h:panelGroup>
				
				<h:panelGroup></h:panelGroup>
				
				<t:panelGroup>
				   <t:panelGrid columns="2">
				   		<h:commandButton value="#{messages['create']}" styleClass="button" action=""></h:commandButton>
					    <h:commandButton value="#{messages['back']}" styleClass="button" action="" immediate="true"></h:commandButton>
				   </t:panelGrid>
				</t:panelGroup>
			</t:panelGrid>
		
		</rich:panel>
